<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#files">Files</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>Timer Library<br/>
<small>
[<a class="el" href="group__other.html">Other</a>]</small>
</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtype_t_m_r.html">typeTMR</a></td></tr>
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html">timer.h</a></td></tr>

<p><tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Additional _timers for ROBOTC. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr.html#ga79fd3eac646964332ed33ec7dd40f208">MAX_TIMERS</a>&#160;&#160;&#160;10</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr.html#gab7dee3d8e9d3a5238f9783c7128c0133">TMRnewTimer</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr.html#gab78c56419d4f5ed99df72510202238ad">TMRisExpired</a> (int timerIdx)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr.html#ga606c8dd6ba44f2b8ba511222f77c6a8c">TMRreset</a> (int timerIdx)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr.html#gafa99bc833c70b23794dab978d79de7bd">TMRreset</a> (int timerIdx, long duration)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr.html#ga997561cae0ac2e4e913cc05de85f96cc">TMRsetup</a> (int timerIdx, long duration)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr.html#ga270cd850fb0b72c436dfec07cb7416aa">TMRexpire</a> (int timerIdx)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structtype_t_m_r.html">typeTMR</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tmr.html#gad7de20a9188849b3bf8ea5cce9f8e367">_timers</a> [MAX_TIMERS]</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Timer Library </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga79fd3eac646964332ed33ec7dd40f208"></a><!-- doxytag: member="timer.h::MAX_TIMERS" ref="ga79fd3eac646964332ed33ec7dd40f208" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_TIMERS&#160;&#160;&#160;10</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Maximum number of _timers Struct for timer data </p>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00042">42</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga270cd850fb0b72c436dfec07cb7416aa"></a><!-- doxytag: member="timer.h::TMRexpire" ref="ga270cd850fb0b72c436dfec07cb7416aa" args="(int timerIdx)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TMRexpire </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>timerIdx</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Cause the timer to expire. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">timerIdx</td><td>the timer to be expired. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00122">122</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<a class="anchor" id="gab78c56419d4f5ed99df72510202238ad"></a><!-- doxytag: member="timer.h::TMRisExpired" ref="gab78c56419d4f5ed99df72510202238ad" args="(int timerIdx)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TMRisExpired </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>timerIdx</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if the timer has expired. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">timerIdx</td><td>the timer to be checked. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the timer has expired, false if it hasn't. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="timer-test1_8c-example.html#a3">timer-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="timer_8h_source.html#l00081">81</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<a class="anchor" id="gab7dee3d8e9d3a5238f9783c7128c0133"></a><!-- doxytag: member="timer.h::TMRnewTimer" ref="gab7dee3d8e9d3a5238f9783c7128c0133" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int TMRnewTimer </td>
          <td>(</td>
          <td class="paramname">&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a new timer. It's an index to the next available timer in the array of timer structs. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the first available slot in the timer object array or -1 if all slots have been used. Increase the MAX_TIMERS variable in this case. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="timer-test1_8c-example.html#a0">timer-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="timer_8h_source.html#l00067">67</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<a class="anchor" id="gafa99bc833c70b23794dab978d79de7bd"></a><!-- doxytag: member="timer.h::TMRreset" ref="gafa99bc833c70b23794dab978d79de7bd" args="(int timerIdx, long duration)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TMRreset </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>timerIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"> <em>duration</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reset the timer, will also mark "expired" flag as false. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">timerIdx</td><td>the timer to be checked. </td></tr>
    <tr><td class="paramname">duration</td><td>the amount of time the timer should run for before expiring. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00110">110</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga606c8dd6ba44f2b8ba511222f77c6a8c"></a><!-- doxytag: member="timer.h::TMRreset" ref="ga606c8dd6ba44f2b8ba511222f77c6a8c" args="(int timerIdx)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TMRreset </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>timerIdx</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reset the timer, will also mark "expired" flag as false.<br/>
 This function will also check if the TMRtask is running and start it up if this isn't the case. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">timerIdx</td><td>the timer to be checked. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="timer-test1_8c-example.html#a2">timer-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="timer_8h_source.html#l00098">98</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga997561cae0ac2e4e913cc05de85f96cc"></a><!-- doxytag: member="timer.h::TMRsetup" ref="ga997561cae0ac2e4e913cc05de85f96cc" args="(int timerIdx, long duration)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TMRsetup </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>timerIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"> <em>duration</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Configure the duration of the timer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">timerIdx</td><td>the timer to be checked. </td></tr>
    <tr><td class="paramname">duration</td><td>the amount of time the timer should run for before expiring. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="timer-test1_8c-example.html#a1">timer-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="timer_8h_source.html#l00134">134</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="gad7de20a9188849b3bf8ea5cce9f8e367"></a><!-- doxytag: member="timer.h::_timers" ref="gad7de20a9188849b3bf8ea5cce9f8e367" args="[MAX_TIMERS]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structtype_t_m_r.html">typeTMR</a> <a class="el" href="group__tmr.html#gad7de20a9188849b3bf8ea5cce9f8e367">_timers</a>[MAX_TIMERS]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold timer data </p>

<p>Definition at line <a class="el" href="timer_8h_source.html#l00052">52</a> of file <a class="el" href="timer_8h_source.html">timer.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:45 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
